javascript problem solving for beginners